//入口文件
console.log("project is running ");
import Vue from 'vue'

//导入路由包
import VueRouter from 'vue-router'
//安装路由
Vue.use(VueRouter);
//导入自己的router.js路由模块
import router from './router'

//导入时间插件
import moment from 'moment'
//定义一个全局的过滤器
Vue.filter('dateFormat',(dateStr,pattern = "YYYY-MM-DD HH:mm:ss") => {
    return moment(dateStr).format(pattern);
});

//导入vue-resource
import VueResource from 'vue-resource'
//安装vue-resource
Vue.use(VueResource);


//按需导入mint-ui组件
import { Header,Swipe,SwipeItem,Button } from 'mint-ui'
Vue.component(Header.name,Header);
Vue.component(Swipe.name,Swipe);
Vue.component(SwipeItem.name,SwipeItem);
Vue.component(Button.name,Button);

//导入mui 样式
import './lib/mui/css/mui.min.css'
import './lib/mui/css/icons-extra.css'
import './lib/mui/fonts/mui-icons-extra.ttf'

//导入APP根组件
import app from './App.vue'


const vm = new Vue({
    el:'#app',
    render:c => c(app),
    /*挂在路由对象到VM实例上面*/
    router:router
});